import React, { Suspense } from 'react'
import ReactDOM from 'react-dom/client'
import { RouterProvider } from 'react-router-dom'
import routes from './router'
export const BuildKernel = () => {
  return ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
    <React.StrictMode>
      <Suspense fallback={<h2>Loading..</h2>}>
        <RouterProvider router={routes} />
      </Suspense>
    </React.StrictMode>
  )
}
